package com.wangyuhang;

import com.wangyuhang.Config.SpringConfig;
import com.wangyuhang.domain.User;
import com.wangyuhang.service.userService;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.omg.CORBA.PUBLIC_MEMBER;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.Scanner;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = SpringConfig.class)
public class test {
    @Autowired
    private userService service;

    @Test
    public void findById() {
        User user = service.findById(2);
        System.out.println(user);
    }
}
